home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 9 / Night Owl CD-ROM (NOPV9) (Night Owl Publisher) (1993).ISO / 002a / vc50_jan.zip / VINSTALL.BAT < prev    next >
DOS Batch File  |  1993-01-24  |  10KB  |  283 lines

  1. ECHO OFF
  2. CLS
  3. REM  Installs VC5 shareware edition.
  4. IF NOT "%1"=="" GOTO %1
  5.  
  6. IF NOT EXIST GET.COM IF NOT EXIST GET GOTO GETERROR
  7. IF EXIST GET COPY GET GET.COM > NUL
  8. ECHO  
  9. ECHO      Checking the system...
  10. SET X=123456789012345678901234567890
  11. IF NOT "%X%"=="123456789012345678901234567890" GOTO ENVERROR
  12. SET X=
  13. GET !J
  14. IF ERRORLEVEL 209 GOTO GOTVIRUS
  15. IF ERRORLEVEL 0 IF NOT ERRORLEVEL 3 ECHO  You must have DOS 3.0 or above.
  16. IF ERRORLEVEL 0 IF NOT ERRORLEVEL 3 GOTO VERYEND
  17. GET !D
  18. SET DR=%GET%
  19. GET !P
  20. SET DI=%GET%
  21. IF "\"=="%DI%" ECHO DO NOT put VC in the root directory.
  22. IF "\"=="%DI%" GOTO VERYEND
  23. CLS
  24. ECHO  
  25. ECHO      Checking the system...
  26. ECHO      System seems clean...
  27. ECHO  
  28. ECHO   Thank you for trying the Victor Charlie Shareware Edition.
  29. ECHO   VC is the world's first GENERIC anti-virus program.
  30. ECHO   You may evaluate this program for 30 days without obligation.
  31. ECHO  
  32. ECHO   Installing and initializing VC is the most important step.
  33. ECHO   After this process, VC5 should function well for you.
  34. ECHO  
  35.  
  36. ECHO   %0 assumes you want VC's Home Directory to be %DR%:%DI%
  37. ECHO   If this is incorrect, please stop %0 now. Move the
  38. ECHO   VC files and %0.BAT to the intended Home Directory and
  39. ECHO   start again from your preferred location.
  40. ECHO  
  41. ECHO   Do you want to install VC in %DR%:%DI%?
  42. ECHO  
  43. GET   Press [Esc] to stop now. Any other key to continue.
  44.  
  45. IF ERRORLEVEL 28 GOTO LOOKSOK
  46. IF ERRORLEVEL 27 ECHO   Returning to DOS....
  47. IF ERRORLEVEL 27 GOTO VERYEND
  48.  
  49. :LOOKSOK
  50. CLS
  51. ECHO  
  52. ECHO    Now backing up your Autoexec.BAT in the VC Home Directory.
  53. COPY C:\AUTOEXEC.BAT AUTOEXEC.VC5 > NUL
  54. IF NOT EXIST AUTOEXEC.VC5 GOTO AUTOERR
  55. ECHO  
  56. :AUTOMSG
  57. ECHO  
  58. ECHO    Your current Autoexec.BAT has been backed up!
  59. ECHO    In the event of any error, AUTOEXEC.VC5 is a record of your
  60. ECHO    original Autoexec.BAT before you started %0.
  61. ECHO    We will not erase this file at any time. However:
  62. ECHO    PLEASE NOTE THE FOLLOWING:
  63. ECHO    If you run %0 more than one time, it is barely  
  64. ECHO    possible that this backup will be over-written by a 
  65. ECHO    "bad" copy of Autoexec.BAT.
  66. ECHO  
  67. ECHO                ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  68. ECHO    IF YOU STOP %0 FOR ANY REASON, BE SURE TO RESTORE YOUR
  69. ECHO    ORIGINAL AUTOEXEC.BAT FILE BEFORE YOU TRY AGAIN.
  70. ECHO    You can do this with one simple command at any point:
  71. ECHO                COPY AUTOEXEC.VC5 C:\
  72. ECHO                ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  73. ECHO  
  74. GET     Please press the = F9 = key to acknowledge this warning:
  75. ECHO  
  76. IF NOT ERRORLEVEL 10 IF ERRORLEVEL 9 GOTO GOTMSG
  77. IF NOT ERRORLEVEL 0 GOTO GOTMSG
  78.  
  79. CLS
  80. GOTO AUTOMSG
  81. :GOTMSG
  82.  
  83. CLS
  84. ECHO   In a moment, %0 will reboot this computer.
  85. ECHO   Making a temporary Autoexec.BAT for that step...
  86. ECHO  
  87. ECHO @ECHO OFF > AUTOBAT
  88. ECHO %DR%: >> AUTOBAT
  89. ECHO CD %DI% >> AUTOBAT
  90. ECHO %0 AFTERBOOT >> AUTOBAT
  91.  
  92. ECHO ECHO OFF > AUTOEXEC.!!!
  93. ECHO CLS >> AUTOEXEC.!!!
  94. ECHO %DR%: >> AUTOEXEC.!!!
  95. ECHO CD %DI% >> AUTOEXEC.!!!
  96. ECHO CALL VCSTART >> AUTOEXEC.!!!
  97. GET !! ;%DR%:%DI%
  98. ECHO ECHO OFF > VRESCUE
  99. ECHO %DR% >> VRESCUE
  100. ECHO CD \ >> VRESCUE
  101. ECHO CD %DI% >> VRESCUE
  102. ECHO VC >> VRESCUE
  103. COPY AUTOEXEC.!!!+C:\AUTOEXEC.BAT > NUL
  104. COPY AUTOEXEC.VC5 C:\AUTOEXEC.BAT > NUL
  105. ECHO   ┌──────────────────────────────────────────────╖
  106. ECHO   │ We now are ready to reboot the computer.     ║
  107. ECHO   │                                              ║
  108. ECHO   │ Please remove any diskette from the A: drive ║
  109. ECHO   │ and hit a key when ready. This will be a     ║
  110. ECHO   │ cold boot. Installation will continue        ║
  111. ECHO   │ AUTOMATICALLY after this. No other action is ║
  112. ECHO   │ required by you.                             ║
  113. ECHO   │                                              ║
  114. ECHO   │ If you wish, or if there is a boot problem,  ║
  115. ECHO   │ hit your RESET button, or turn the computer  ║
  116. ECHO   │ Off and back On again.                       ║
  117. ECHO   ╘══════════════════════════════════════════════╝
  118. ECHO  
  119. ECHO  
  120. ECHO     Remove any diskette from the A: drive.
  121. ECHO     Then press a key to reboot now...
  122. ECHO  
  123. PAUSE > NUL 
  124. COPY AUTOBAT C:\AUTOEXEC.BAT
  125. GET !C
  126.  
  127. :AFTERBOOT
  128. ECHO  
  129. ECHO             ╔═══════════════════════════════════════════╗
  130. ECHO             ║  CONTINUING INSTALLATION OF VC SHAREWARE  ║
  131. ECHO             ╚═══════════════════════════════════════════╝
  132. ECHO  
  133. PROMPT $P$G
  134. IF EXIST GET COPY GET GET.COM > NUL
  135. ECHO     NOTE: You may not have your usual color screen at the moment.
  136. ECHO           Your FULL and normal setup will be restored soon.
  137. ECHO           Please bear with us through the rest of this short process.
  138. ECHO  
  139. ECHO   ┌───────────────────────────────────────────────────────────╖
  140. ECHO   │ By rebooting the computer, we have established the best   ║
  141. ECHO   │ possible conditions for initialization of VC. It is       ║
  142. ECHO   │ important that the program have ONE look at your machine  ║
  143. ECHO   │ in an "original" state. When we finish with initializing, ║
  144. ECHO   │ there will be no restrictions on running software.        ║
  145. ECHO   ╘═══════════════════════════════════════════════════════════╝
  146. ECHO        
  147. ECHO   We now will attempt to "initialize" VC.
  148. ECHO   Hit a key to continue....
  149. ECHO  
  150. PAUSE > NUL
  151. COPY VC1 VC1.COM > NUL
  152. VC1
  153. IF NOT ERRORLEVEL 1 GOTO WEDIDIT
  154. PAUSE
  155. :VINITERR
  156. ECHO  
  157. ECHO       Do you wish to [F]orce initialization, or,
  158. ECHO       Do you wish to [S]top now and look for the trouble?
  159. ECHO  
  160. ECHO    (If you choose [S]top, try again with the command VINIT.)
  161. ECHO    (%0 will now delete itself and clean up the directory.)
  162. ECHO  
  163. GET    Press [F] or [S] now.
  164.  
  165. IF ERRORLEVEL 84 GOTO VINITERR
  166. IF ERRORLEVEL 83 GOTO VERYEND
  167. IF ERRORLEVEL 71 GOTO VINITERR
  168. IF ERRORLEVEL 70 GOTO TRYAGAIN
  169. IF ERRORLEVEL 0 GOTO VINITERR
  170. ECHO  
  171.  
  172. :WEDIDIT
  173. CLS
  174. ECHO   
  175. ECHO   INITIALIZATION SUCCESSFUL. Making the rest of the program....
  176. COPY VC VC.EXE > NUL
  177. COPY VC2 VC2.EXE > NUL
  178. COPY VCHECK VCHECK.COM > NUL
  179. COPY VCOMP VCOMP.COM > NUL
  180. COPY BOOTFIX BOOTFIX.COM > NUL
  181. ECHO   Making program backups...
  182. COPY VC1.COM VC1.BIN > NUL
  183. COPY VC.BIN VCBIN > NUL
  184. COPY AUTOEXEC.!!! C:\AUTOEXEC.BAT > NUL
  185. ECHO  
  186. ECHO    Thank you for installing Victor Charlie for a tryout.
  187. ECHO    The following changes have been made to your Autoexec:
  188. ECHO    1. A computer startup routine has been added. This will
  189. ECHO       check your system every time you boot. This will add
  190. ECHO       three or four seconds to your boot time under normal
  191. ECHO       circumstances. It will HALT the machine in case of trouble.
  192. ECHO    2. The VC Home Directory has been added to your path.
  193. ECHO       This will allow you to use the program at any time.
  194. ECHO       For a quick check, just type  " VC5 " and hit Enter
  195. ECHO       To use the program menu, just type " VC "
  196. ECHO    We hope you will like this new and secure method of 
  197. ECHO    detecting, tracking and fixing virus (and other) attacks
  198. ECHO    which may be made on your computer. If you find VC to
  199. ECHO    be your type of program, please register. You will find
  200. ECHO    the ORDER.DOC to do this in this VC Home Directory.
  201. ECHO   
  202. ECHO ┌───────────────────────────────────────────────────────────────┐
  203. ECHO │ If you change your DOS or basic setup (in CONFIG.SYS) you may │
  204. ECHO │ have to re-initialize VC. Do this with the command " VINIT "  │
  205. ECHO └───────────────────────────────────────────────────────────────┘
  206. ECHO  
  207. ECHO   Press any key and we will reboot one more time to restore
  208. ECHO   your normal computer setup.
  209. ECHO  
  210. PAUSE > NUL
  211. GET !W
  212.  
  213. GOTO VERYEND
  214.  
  215. :TRYAGAIN
  216. CLS
  217. ECHO  
  218. ECHO    Forcing initialization of VC...
  219. COPY VC1 VC1.COM > NUL
  220. VC1 !
  221. IF ERRORLEVEL 1 GOTO VERYEND
  222. GOTO WEDIDIT
  223.  
  224. GOTO VERYEND
  225.  
  226. :GETERROR
  227. CLS
  228. ECHO   This routine requires the VC utility GET.COM.
  229. ECHO   Please place this utility in this directory. If you did not
  230. ECHO   receive GET with your VC5 package, please contact your sysop
  231. ECHO   and inform him that he has an incomplete VC package.
  232. ECHO  
  233. GOTO VERYEND
  234.  
  235. :ENVERROR
  236. CLS
  237. ECHO  
  238. ECHO   %0 needs at least 30 bytes of free environment space.
  239. ECHO   Please increase the amount of environement and try again.
  240. ECHO  
  241. GOTO VERYEND
  242.  
  243. :GOTVIRUS
  244. ECHO  
  245. ECHO   This machine appears to have an active virus!
  246. ECHO   This is not a test message or a joke. GET.COM has
  247. ECHO   been altered by virus-like activity. Turn this machine
  248. ECHO   OFF for 30 seconds. Put a clean, write-protected DOS
  249. ECHO   diskette in the A: drive and reboot. Come back here and
  250. ECHO   try  "%0"  again, and we probably can defeat what
  251. ECHO   seems to be a virus in the next half hour or so.
  252. ECHO  
  253. GOTO VERYEND
  254.  
  255. :AUTOERR
  256. ECHO  
  257. ECHO   %0 could not find a C:\AUTOEXEC.BAT on this computer,
  258. ECHO   or could not make a copy of it as a backup.
  259. ECHO   This indicates the machine is not ready for actual use, or
  260. ECHO   does not have any useable disk space left. VC should not
  261. ECHO   (or cannot) be installed on such a machine.
  262. ECHO  
  263. GOTO VERYEND
  264.  
  265. :CLUP
  266. ECHO    Placing VC startup check routine at the beginning of Autoexec ...
  267. ECHO    Placing VC Home Directory in your path (if found) ...
  268. COPY AUTOEXEC.!!! C:\AUTOEXEC.BAT > NUL
  269. GET !J
  270. IF ERRORLEVEL 4 GOTO VERYEND
  271. IF "%GET%"=="31" GOTO VERYEND
  272. IF "%GET%"=="3" GOTO VERYEND
  273. ECHO  
  274. ECHO           !!! WARNING !!! 
  275. ECHO   This machine appears to have DOS 3.2 or below.
  276. ECHO   If so, the startup routine in Autoexec will not work.
  277. ECHO   Please adjust " @echo off " to " echo off " and
  278. ECHO   change the " CALL " to " COMMAND /C " as required.
  279. ECHO   See your DOS manual for guidance on these commands.
  280. ECHO  
  281.  
  282. :VERYEND
  283.